import request from '@/utils/request'

// 获取内容库的资讯列表
export function getBlogstoreList(query){
  return request({
    url: '/adm/v1/real-time/list',
    method: 'get',
    params: query
  })
}
// 获取某资讯详情
export function getBlogstoreOne(id) {
  return request({
      url: `/adm/v1/real-time/one/info/${id}`,
      method: 'get',
  })
}
// 删除资讯
export function deleteBlogstoreOne(data) {
  return request({
    url: `/adm/v1/real-time/delete`,
    method: 'delete',
    data

  })
}
// 修改资讯状态
export function changeBlogstoreOneStatus(data) {
  return request({
    url: '/adm/v1/real-time/update/status',
    method: 'put',
    data
  })
}

// 编辑资讯信息
export function editBlogstoreOne(data) {
  return request({
    url: '/adm/v1/real-time/update',
    method: 'put',
    data
  })
}


// 新增一条资讯
export function createBlogstoreOne(data) {
  return request({
    url: '/adm/v1/real-time/add',
    method: 'post',
    data
  })
}

// 修改排序值/浏览量 cm/adm/v1//real-time/update/sort/watchNum
export function editBlogstoreSortOrWatchnum(data) {
  return request({
    url: '/adm/v1/real-time/update/sort/watchNum',
    method: 'put',
    data
  })
}